package com.atung.parking.enums;

import lombok.Getter;

/**
 * @author Administrator
 */

@Getter
public enum SuperUserState {
    NORMAL("正常"),
    DISABLED("禁用");
    private final String description;

    SuperUserState(String description) {
        this.description = description;
    }

    public static String getDescriptionByIndex(Integer index) {
        for (SuperUserState type : values()) {
            if (index.equals(type.ordinal())) {
                return type.getDescription();
            }
        }
        return index.toString();
    }
}
